/* 
 * File:   Trapezium.h
 * Author: lgr013
 *
 * Created on 13 de septiembre de 2014, 12:12
 */

#ifndef TRAPEZIUM_H
#define	TRAPEZIUM_H

#include "Object.h"
#include "ObjFactory.h"
#include "Dot.h"
#include <Box2D/Box2D.h>
#include "WorldElement.h"
#include "../Controller/SBSLog.h"

class Trapezium : public WorldElement{
private:
    Object *object;
    struct ObjectInit data;
    bool equals;
    void updatePosition();
    void updateRotation();
public:
    Trapezium();
    Trapezium(ObjFactory *objFactory, bool flagStatic, float x, float y, float base, float height, double alpha, double beta, float mass, float rotation, int idImage);
    bool getAreEquals();
    void checkChanges();
    void updateData();
    struct ObjectInit getData();    
    
    void restartPlayer();
    
    virtual ~Trapezium();
    
    b2Vec2 getPosition();
    float getAngle();
    float getAngularVelocity();
    
    void setAngularVelocity(float velocity);
    void setUbicDyn(int i);
    b2Body* getBody();
    
};

#endif	/* TRAPEZIUM_H */

